﻿<html>
<body>
	<div class="login layui-anim layui-anim-up">
		<div class="message">用户登录</div>
		<form id="frmlogin">
			<label class="layui-form-label">昵称</label>
			<div class="layui-input-block">
				<input name="LName" type="text" required autocomplete="off" class="layui-input">
			</div>
			<label class="layui-form-label">密码</label>
			<div class="layui-input-block">
				<input name="Pwd" type="password" required autocomplete="off" class="layui-input">
			</div>
			<input class="layui-btn layui-btn-warm" value="登录" lay-submit lay-filter="login" type="button" onclick="login()">
		</form>
	</div>
</body>
</html>
<style>
	.layui-input {
	margin-bottom:20px;
    }
	.login {
	text-align:center;
    margin-top:25%;
	margin-right:50px;
    }
    body {
		background: beige;
	}
    </style>
<script>
    function login() {
        var re = $("#frmlogin").serialize();
		$.post("/Admin/Home/DealLogin",re, function (r) {
            if (r.success) {
                location.href = "/Admin/Home/Index";
            }
            else {
				alert(r.message);
            }
        }, "json")

    }
</script>
